function showDialog()
{
	var param = _param_.length > 0 ? eval(_param_) : new Array();
	var _ischeck = new Array();
	if (param != null)
	{
		for ( var i in param)
		{
			_ischeck.push(param[i][0]);
		}
	}
	var obj = new Object();
	obj.param = param;
	obj._ischeck = _ischeck;
	var returnValue = window
			.showModalDialog(
					"roleFunTree.jsf",
					obj,
					"dialogHeight:400px;dialogWidth:310px;center:yes;edge:no;help:no;resizable:no;scroll:auto;status:no;unadorned:no");

	if (returnValue)
	{
		if (returnValue.length == 1)
		{
			$("#roleForm\\:roleOrg").val(returnValue[0].id);
			$("#roleForm\\:funName").val(returnValue[0].name);
			$("#roleForm\\:funRight").val(returnValue[0].select);
		}
		else if (returnValue.length > 1)
		{
			var a = "", b = "", c = "";
			for ( var i in returnValue)
			{
				a += returnValue[i].id + "~" + returnValue[i].select + ",";
				// b += returnValue[i].name+"、";
				// c += returnValue[i].select+"~";
			}
			$("#roleForm\\:thisRoleFunRight").val(a);
		}

	}
}

/*
 * 
 * 列表页面条件查询重置方法，请自行填写
 */
function searchReset()
{

	$("#roleForm\\:roleCode").val("");
	$("#roleForm\\:roleName").val("");
}

function verifySumbit()

{

	var check = null;

	/*--------roleCode--------*/
	if ($("#roleForm\\:roleCode").val().length == 0)
	{
		$("#roleForm\\:roleCode").next().html("*注释不能够为空！");
		if (!check)
			check = $("#roleForm\\:roleCode");
	}
	else
	{
		if ($("#roleForm\\:roleCode").val().length > 20)
		{
			$("#roleForm\\:roleCode").next().html("*注释长度不能大于20!");
			if (!check)
				check = $("#roleCodeForm\\:roleCode");
		}
		else
		{
			$("#roleForm\\:roleCode").next().html("*");
		}
	}

	/*--------roleName--------*/
	if ($("#roleForm\\:roleName").val().length == 0)
	{
		$("#roleForm\\:roleName").next().html("*注释不能够为空！");
		if (!check)
			check = $("#roleForm\\:roleName");
	}
	else
	{
		if ($("#roleForm\\:roleName").val().length > 20)
		{
			$("#roleForm\\:roleName").next().html("*注释长度不能大于20!");
			if (!check)
				check = $("#roleNameForm\\:roleName");
		}
		else
		{
			$("#roleForm\\:roleName").next().html("*");
		}
	}

	/*--------roleDesc--------*/

	if ($("#roleForm\\:roleDesc").val().length > 100)
	{
		$("#roleForm\\:roleDesc").next().html("*注释长度不能大于100!");
		if (!check)
			check = $("#roleDescForm\\:roleDesc");
	}
	else
	{
		$("#roleForm\\:roleDesc").next().html("*");
	}

	if (check)
	{
		check.focus();
		return false;
	}
	else
	{
		return true;
	}

}
